ItemSlot
| Kind of class: | class |
|---|---|
| Inherits from: | UIComponent < MovieClip |
| Classpath: | gfx.controls.ItemSlot |
| File last modified: | Tuesday, 29 June 2010, 09:03:27 |
The ItemSlot composes a button and a Drag target to add button-state functionality to and item with a dragTarget. This is useful when both clicking and dragging functionality is required.
Component metadata:
| InspectableList | "disabled" "dragAcceptTypes" "enableInitCallback" "iconLinkage" "selected" "soundMap" "toggle" "visible" |
|---|
Summary
Instance properties
- iconLinkage
- The linkage of the draggable "icons" symbol in the library.
- soundMap
- Mapping between events and sound process
- button
- The button element of the ItemSlot.
- dragTarget
- The drag target element of the ItemSlot.
- data
- The data object representing the item to be displayed.
- dragAcceptTypes
- Indicates the types of data this ItemSlot will accept.
- toggle
- An ItemSlot with a toggle value of true will change its selected state when it is "clicked".
- selected
- Set the selected state of the ItemSlot.
- disabled
- Disable this component.
Instance properties inherited from UIComponent
__height __width _disabled _displayFocus _focused addEventListener cleanUpEvents disabled dispatchEvent displayFocus enableInitCallback focused focusHandlerReference focusTarget hasEventListener height initialized invalidationIntervalID removeAllEventListeners removeEventListener sizeIsInvalid soundMap visible width
Class methods
Class methods inherited from UIComponent
Instance methods
Instance methods inherited from UIComponent
Instance properties
data
data:Object
(read,write)
The data object representing the item to be displayed. Item slot expects the object to have
type, quantity. and asset properties. The asset property specifies the frame or label to display in the icons MovieClip. disabled
disabled:Boolean
(read,write)
Disable this component. Focus (along with keyboard events) and mouse events will be suppressed if disabled.
dragAcceptTypes
dragAcceptTypes:Array
(read,write)
Indicates the types of data this ItemSlot will accept. These strings are matched against the "type" property of the data object passed to allowDrop. Setting dragAcceptTypes to ["*"] or null will cause it to accept all types.
Parameters:
types:
An array of strings that will be matched against the data object "type" property.
iconLinkage
iconLinkage:String = "icons"
(read,write)
The linkage of the draggable "icons" symbol in the library.
selected
selected:Boolean
(read,write)
Set the selected state of the ItemSlot. ItemSlots can have two sets of mouse states, a selected and unselected. When an ItemSlot's
toggle property is true the selected state will be changed when the item slot is clicked, however the selected state can be set using ActionScript even if the toggle property is false. soundMap
soundMap:Object = { theme:"default",focusIn:"focusIn", focusOut:"focusOut", drop:"drop"}
(read,write)
Mapping between events and sound process
toggle
toggle:Boolean
(read,write)
An ItemSlot with a toggle value of
true will change its selected state when it is "clicked".